package Person.Buffer;

import java.io.*;

public class BufferedStreamDemo03 {
    public static void main(String[] args) throws IOException {
       /* BufferedWriter bw = new BufferedWriter(new FileWriter("C:\\Users\\win10\\IdeaProjects\\IDEA\\bos.txt"));


        for(int i=0;i<10;i++){
            bw.write("hello"+i);
            bw.newLine();
            //bw.write("\r\n");
            bw.flush();
        }
        bw.close();
*/

        //创建字符缓冲输入流
        BufferedReader br = new BufferedReader(new FileReader("C:\\\\Users\\\\win10\\\\IdeaProjects\\\\IDEA\\\\bos.txt"));
//第一次读取数据
       /* String line = br.readLine();
        System.out.println(line);*/

//第二次读取数据


        String line;
        while((line=br.readLine())!=null){
            System.out.println(line);
        }
br.close();






    }
}
